home *** CD-ROM | disk | FTP | other *** search
- Path: news.nstn.ca!news
- From: nstn181a@fox.nstn.ca (Pierre G. Boutquin)
- Newsgroups: comp.lang.c++
- Subject: Re: Leap year
- Date: Mon, 18 Mar 96 21:08:51 -0400
- Organization: Nova Scotia Technology Network
- Message-ID: <4il542$oim@news.nstn.ca>
- NNTP-Posting-Host: toronto-ts-31.nstn.ca
-
- In <3146D0D8.16BA@msn.com>, "Poul A. Costinsky" writes:
- >return (!(y % 4) && (y % 100));
-
- Noooo!
-
- // There are 365.2422 days in a year.
- return (!(y%400) || (!(y%4) && y%100));
-
-
- Pierre.
-